package com.wyg.blog.service.blog;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wyg.blog.model.blog.Type;

import java.util.List;

public interface TypeService {
    List<Type> selectAllTypes();

    List<Type> selectLatestTypes();

    Integer selectTypeCount();

    IPage<Type> selectSomeTypes(Page<?> page);

    String selectTypeName(Integer id);

    Type selectTypeByName(String name);

    Type selectTypeById(Integer id);

    boolean insertType(Type type);

    boolean renewTypeState(Integer id, boolean state);

    boolean renewType(Integer id, String type);

    boolean removeType(Integer id);

    /**
     * 模糊查询
     * @param type  查询条件
     * @return
     */
    List<Type> fuzzySearch(String type);
}
